<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>>
		<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js">
		</script>
		</script>
	</head>
	<body>
		<a href="#" onclick="hello()">hello</a>
		<script type="text/javascript"> 
		function hello() {
			console.log("hello。。。");

			let myData = {};
			myData.name = "jinzhen";
			myData.age = 18;
			$.ajax({
				url:"http://127.0.0.1:9000/hello",
				data:JSON.stringify(myData),//你要传的参数
				type:"POST",//PUT、DELETE
				processData:false,//是否对参数进行序列化，会把{name:'huang',sex:1}序列化name='huang'&sex=1,默认为true。
				contentType:"application/json",//这里是Header中自带的contentType
				success:function(data){
					console.log(data);
				},
				error:function(data){
					console.log("error...")
				}
			});
		}
		</script> 
	</body>
</html>
